package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DishesSerivceMapper;
import com.ruoyi.system.domain.DishesSerivce;
import com.ruoyi.system.service.IDishesSerivceService;

/**
 * 菜品取拿Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-06-17
 */
@Service
public class DishesSerivceServiceImpl implements IDishesSerivceService 
{
    @Autowired
    private DishesSerivceMapper dishesSerivceMapper;

    /**
     * 查询菜品取拿
     * 
     * @param disId 菜品取拿ID
     * @return 菜品取拿
     */
    @Override
    public DishesSerivce selectDishesSerivceById(Long disId)
    {
        return dishesSerivceMapper.selectDishesSerivceById(disId);
    }

    /**
     * 查询菜品取拿列表
     * 
     * @param dishesSerivce 菜品取拿
     * @return 菜品取拿
     */
    @Override
    public List<DishesSerivce> selectDishesSerivceList(DishesSerivce dishesSerivce)
    {
        return dishesSerivceMapper.selectDishesSerivceList(dishesSerivce);
    }

    /**
     * 新增菜品取拿
     * 
     * @param dishesSerivce 菜品取拿
     * @return 结果
     */
    @Override
    public int insertDishesSerivce(DishesSerivce dishesSerivce)
    {
        dishesSerivce.setDisCreatetime(DateUtils.getNowDate());
        return dishesSerivceMapper.insertDishesSerivce(dishesSerivce);
    }

    /**
     * 修改菜品取拿
     * 
     * @param dishesSerivce 菜品取拿
     * @return 结果
     */
    @Override
    public int updateDishesSerivce(DishesSerivce dishesSerivce)
    {
        return dishesSerivceMapper.updateDishesSerivce(dishesSerivce);
    }

    /**
     * 批量删除菜品取拿
     * 
     * @param disIds 需要删除的菜品取拿ID
     * @return 结果
     */
    @Override
    public int deleteDishesSerivceByIds(Long[] disIds)
    {
        return dishesSerivceMapper.deleteDishesSerivceByIds(disIds);
    }

    /**
     * 删除菜品取拿信息
     * 
     * @param disId 菜品取拿ID
     * @return 结果
     */
    @Override
    public int deleteDishesSerivceById(Long disId)
    {
        return dishesSerivceMapper.deleteDishesSerivceById(disId);
    }
}
